package com.ftar.urgent.ui.fragment;

import android.annotation.SuppressLint;
import android.os.Bundle;

import androidx.fragment.app.Fragment;

import org.greenrobot.eventbus.EventBus;

@SuppressLint("ValidFragment")
public class BaseFragment extends Fragment {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        registerEvent();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();

        unregisterEvent();
    }

    public void onAsrListener(String word) {

    }

    private void registerEvent() {
        EventBus.getDefault().register(this);
    }

    private void unregisterEvent() {
        EventBus.getDefault().unregister(this);
    }
}